package sctu.edu.java.year2016.team04.luoxinghua.lianxi.cometurejiekou;

/**
 * Created by 落叶的思恋 on 2016/5/27.
 */
public class Test {
    public static void main(String[] args) {
        Realize r = new Realize();
        System.out.println("引用对象引用调用的方法");
        System.out.println("a+b=" + r.jia(15, 3));
        System.out.println("a*b=" + r.cheng(15, 3));
        System.out.println("a-b=" + r.jian(15, 3));
        Jia newjia = r;
        Cheng newcheng = r;
        Jian newjian = r;
        System.out.println("使用接口调用引用调用的方法");
        System.out.println("a+b=" + newjia.jia(15, 3));
        System.out.println("a*b=" + newcheng.cheng(15, 3));
        System.out.println("a-b=" + r.jian(15, 3));
    }

}
